package langchain4j.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import langchain4j.entity.Department;
import langchain4j.mapper.DepartmentMapper;
import langchain4j.service.DepartmentService;
import langchain4j.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> getDepartmentByName(String categoryName) {
        if (StringUtils.isBlank(categoryName)) {
            throw new IllegalArgumentException("科室名称不能为空");
        }
        return departmentMapper.getDepartmentByName(categoryName);
    }
}
